<?php 
// https://api.oick.cn/random/api.php?type=pc 图片接口
?>
<html>
<head>
    <meta charset="UTF-8">
    <title>支付系统数据大屏</title>
    <link rel="stylesheet" href="<?=adminassets?>assets/pear/component/pear/css/pear.css">
    <style>
        body {
            background: linear-gradient(45deg, rgba(26, 41, 128, 0.7), rgba(38, 208, 206, 0.7)),
             url('<?=$this->conf['imgbody']?>') no-repeat center center fixed;
             background-size: cover;
            color: #fff;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        }
        .container {
            padding: 30px;
            animation: fadeIn 1s ease-in;
        }
        .chart-container {
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
            border: 1px solid rgba(255, 255, 255, 0.18);
            margin-bottom: 20px;
            transition: transform 0.3s ease;
        }
        .chart-container:hover {
            transform: translateY(-5px);
        }
        .stats-card {
            padding: 30px;
            text-align: center;
        }
        .big-number {
            font-size: 42px;
            font-weight: 600;
            background: linear-gradient(45deg, #fff, #73ffff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin: 10px 0;
        }
        .small-title {
            font-size: 18px;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 15px;
            font-weight: 500;
        }
        .data-item {
            margin: 15px 0;
        }
        .layui-row {
            margin-bottom: 20px;
        }
        .chart-title {
            font-size: 18px;
            margin-bottom: 15px;
            color: rgba(255, 255, 255, 0.9);
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        [class*='layui-col-'] {
            padding: 10px;
        }
    </style>
</head>
<body>
<div class="container">
    <!-- 顶部数据卡片 -->
    <div class="layui-row">
        <div class="layui-col-md3">
            <div class="chart-container stats-card">
                <div class="small-title">今日支付总额</div>
                <div class="big-number">￥<span id="todaymoney">0.00</span></div>
                <div class="data-item">同比昨日 ￥<span id="samemoney">0.00</span></div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div class="chart-container stats-card">
                <div class="small-title">今日成功订单数</div>
                <div class="big-number"><span id="todayorder">0</span></div>
                <div class="data-item">同比昨日 <span id="sameorder">0</span></div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div class="chart-container stats-card">
                <div class="small-title">今日支付成功率</div>
                <div class="big-number"><span id="todaysuccessRate">0</span>%</div>
                <div class="data-item">较昨日 <span id="sameRate">0</span>%</div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div class="chart-container stats-card">
                <div class="small-title">总订单完成金额</div>
                <div class="big-number">¥<span id="PayAllMoney">0</span></div>
                <div class="data-item">未完成金额 ¥<span id="falseMoney">0</span</div>
            </div>
        </div>
        
    </div>
    <div class="layui-row">
        <div class="layui-col-md3">
            <div class="chart-container stats-card">
                <div class="small-title">今日总额</div>
                <div class="big-number">￥<span id="todayPayAllMoney">0.00</span></div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div class="chart-container stats-card">
                <div class="small-title">今日订单数</div>
                <div class="big-number"><span id="todayOrderTotal">0</span></div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div class="chart-container stats-card">
                <div class="small-title">昨日支付成功率</div>
                <div class="big-number"><span id="lastsuccessRate">0</span>%</div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div class="chart-container stats-card">
                <div class="small-title">总订单金额</div>
                <div class="big-number">¥<span id="AllMoney">0</span></div>
            </div>
        </div>
        
    </div>

    <!-- 图表区域 -->
    <div class="layui-row">
        <div class="layui-col-md8">
            <div class="chart-container">
                <div class="chart-title">本周支付趋势分析</div>
                <div id="lineChart" style="height: 350px;"></div>
            </div>
        </div>
        <div class="layui-col-md4">
            <div class="chart-container">
                <div class="chart-title">支付方式分布</div>
                <div id="paymentMethods" style="height: 350px;"></div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-col-md12">
            <div class="chart-container">
                <div class="chart-title">商户收款排行榜(前10)</div>
                <div id="topProducts" style="height: 350px;"></div>
            </div>
        </div>
    </div>
</div>
<script src="<?=adminassets?>assets/pear/component/layui/layui.js"></script>
<script src="<?=adminassets?>assets/pear/component/pear/module/echartsTheme.js"></script>
<script src="<?=adminassets?>assets/pear/component/pear/module/echarts.js"></script>
<script src="<?=adminassets?>assets/js/core_js/consume.js?v=<?=time()?>"></script>